/**
 * role api
 */
import $http from '../../http/http'

/**
 * 根据角色名获取角色列表
 */
export const queryRolesPage = (roleName, pageNo, pageSize) => {
    return $http.get("roleOperations/queryRolesPage", {
        params: {
            roleName: roleName,
            pageNo: pageNo,
            pageSize: pageSize
        }
    });
}

/**
 * 新增角色
 */
export const newRole = (data) => {
    return $http.post("roleOperations/newRole", data);
}

/**
 * 删除角色
 * @param {删除角色请求数据} data 
 */
export const deleteRole = data => {
    return $http.post("roleOperations/deleteRole", data);
}